EMT Practice Test

1. Question Content...


Question List

Question1: Which aspect of Apex programming is limited due to multitenancy?

Question2: A developer needs to prevent the creation of Request__c records when certain coVraitions exist in the system. A RequeatLogic class exists that checks the conditions.
What is the correct implementation?

Question3: A developer is creating an app that contains multiple Lightning web components.
One of the child components is used for navigation purposes. When a user click a button called.. component, the parent component must be alerted so it can navigate to the next page.
How should this be accomplished?

Question4: A developer must write anApex method that will be called from a lightning component. The method may delete an Account stored in the accountRec variable.
Which method should a developer use to ensure only users that should be able to delete Accounts can successfully perform deletion?

Question5: Which salesforce org has a complete duplicate copy of the production org including data and configuration?

Question6: The following code snippet is executed by a Lightning web component in an environment with more than 2,000 lead records:

Which governor limit will likely be exceeded within the Apex transaction?

Question7: When the code executes, a DML exception is thrown.
How should a developer modify the code to ensure exceptions are handled gracefully?

Question8: What are two considerations for deploying from a sandbox to production?
Choose 2 answers

Question9: Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records.
Which Visualforce feature supports this requirement?

Question10: A business has a proprietary Order Management System (OMS) that creates orders from their website and fulfills the orders. When the order is created in the OMS, an integration also creates an order record in Salesforce and relates it to the contact as identified by the email on the order. As the order goes through different stages in the OMS, the integration also updates It in Salesforce. It is noticed that each update from the OMS creates a new order record in Salesforce.
Which two actions will prevent the duplicate order records from being created in Salesforce?
Choose 2 answers

Question11: A developer created a new trigger that inserts a Task when a new Lead is created. After deploying to production, an outside integration chat reads task records is periodically reporting errors.
Which change should the developer make to ensure the integration is not affected with minimal impact to business logic?

Question12: Universal Containers has a Visualforce page that displays a table of every Container_c. being ....... Is falling with a view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?

Question13: Given the following code snippet, that is part of a custom controller for a Visualforce page:

In which two ways can the try/catch be enclosed to enforce object and field-level permissions and prevent the DML statement from being executed if the current logged-in user does not have the appropriate level of access? Choose 2 answers

Question14: Which action causes a before trigger to fire by default for Accounts?

Question15: A credit card company needs to implement the functionality for a service agent to process damaged or stolen credit cards. When the customers call in, the service agent must gather many pieces of information. A developer is tasked to implement this functionality.
What should the developer use to satisfy this requirement in the most efficient manner?

Question16: What are two characteristics related to formulas?
Choose 2 answers

Question17: A developer wrote Apex code that calls out to an external system. How should a developer write the test to provide test coverage?

Question18: The values 'High', 'Medium', and 'Low' are Identified as common values for multiple picklist across different object. What is an approach a developer can take to streamline maintenance of the picklist and their values, while also restricting the values to the ones mentioned above?

Question19: What should a developer do to check the code coverage of a class after running all tests?

Question20: What are three characteristics of change set deployments?
Choose 3 answers

Question21: A software company uses the following objects and relationships:
* Case: to handle customer support issues
* Defect_c: a custom object to represent known issues with the company's software
* case_Defect__c: a junction object between Case and Defector to represent that a defect Is a customer issue What should be done to share a specific Case-Defect_c record with a user?

Question22: Which statement describes the execution order when trigger are associated to the same object and event?

Question23: Which three statements are true regarding custom exceptions in Apex? (Choose three.)

Question24: The sales management team at Universal Container requires that the Lead Source field of the Lead record be populated when a.. converted.
What should be done to ensure that a user populates the Lead Source field prior to converting a Lead?

Question25: A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.
Which two tools can they use to run a script that deploys to a sandbox?
Choose 2 answers

Question26: Cloud kicks has a muli-screen flow its call center agents use when handling inbound service desk calls.
At one of the steps in the flow, the agents should be presented with a list of order number and dates that are retrieved from an external odrer management system in real time and displayed on the screen.
What shuold a developer use to satisfy this requirement?

Question27: What should be used to create scratch orgs?

Question28: A primaryid_c custom field exists on the candidate_c custom object. The filed is used to store each candidate's id number and is marked as Unique in the schema definition.
As part of a data enrichment process. Universal Containers has a CSV file that contains updated data for all candidates in the system, the file contains each Candidate's primary id as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system.
Which technique should the developer implement to streamline the data upload?

Question29: Which three Salesforce resources can be accessed from a Lightning web component?
Choose 3 answers

Question30: What are three considerations when using the @InvocableMethod annotation in Apex?
Choose 3 answers

Question31: A custom Visualforce controller calls the ApexPages,addMessage () method, but no messages are rendering on the page.
Which component should be added to the Visualforce page to display the message?

Question32: Ursa Major Solar has a custom object, serviceJob-o, with an optional Lookup field to Account called partner-service-Provider_c.
The TotalJobs-o field on Account tracks the total number of serviceJob-o records to which a partner service provider Account is related.
What is the most efficient way to ensure that the Total job_o field kept up to data?

Question33: A developer created a Visualforce page and custom controller to display the account type field as shown below.
Custom controller code:

Visualforce page snippet:

The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is properly referenced on the Visualforce page, what should the developer do to correct the problem?

Question34: A developer at AW Computing is tasked to create the supporting test class for a programmatic customization that leverages records stored within the custom object, Pricing Structure c. AW Computing has a complex pricing structure for each item on the store, spanning more than 500 records.
hich two approaches can the developer use to ensure Pricing _Structure__c records are available when the test class is executed?
Choose 2 answers

Question35: Universal Containers needs to create a custom user interface component that allows users to enter information about their accounts.
The component should be able to validate the user input before saving the information to the database.
What is the best technology to create this component?

Question36: A Lightning component has a wired property, searchResults, that stores a list of Opportunities. Which definition of the Apex method, to which the searchResults property is wired, should be used?

Question37: Universal Containers stores the availability date on each Line Item of an Order and Orders are only shipped when all of the Line Items are available. Which method should be used to calculate the estimated ship date for an Order?

Question38: Assuming that naze is 8 String obtained by an <apex:inpotText> tag on 8 Visualforce page, which two SOQL queries performed are safe from SOQL injection?
'Choose 2 answers

Question39: Universal Containers hires a developer to build a custom search page to help user- find the Accounts they want. Users will be able to search on Name, Description, and a custom comments field.
Which consideration should the developer be aware of when deciding between SOQL and SOSL?
Choose 2 answers

Question40: A developer observes that an Apex test method fails in the Sandbox. To identify the issue, the developer copies the code inside the test method and executes it via the Execute Anonymous tool in the Developer Console. The code then executes with no exceptions or errors. Why did the test method fail in the sandbox and pass in the Developer Console?

Question41: A developer deployed a trigger to update the status__c of Assets related to an Account when the Account''s status changes and a nightly integration that updates Accounts in bulk has started to fail with limit failures.

What should the developer change about the code to address the failure while still having the code update all of the Assets correctly?

Question42: Cloud kicks has a multi-screen flow that its call center agents use when handling inbound service desk calls.
At one of the steps in the flow, the agents should be presented with a list of order numbers and dates that are retrieved from an external order management system in real time and displayed on the screen.
What should a developer use to satisfy this requirement?

Question43: Where are two locations a developer can look to find information about the status of asynchronous or future methods? Choose 2 answers

Question44: A developer Is Integrating with a legacy on-premise SQL database.
What should the developer use to ensure the data being Integrated is matched to the right records in Salesforce?

Question45: What is the result of the following code snippet?

Question46: Universal Containers has a Visualforce page that displays a table of every Container_c. being ....... Is falling with a view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?

Question47: A developer needs to allow users to complete a form on an Account record that will create a record for a custom object.
The form needs to display different fields depending on the user's job role. The functionality should only be available to a small group of users.
Which three things should the developer do to satisfy these requirements?
Choose 3 answers

Question48: A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what defined for payments in the PaymentProcessor interface. public interface PaymentProcessor { void pay(Decimal amount); } Which is the correct implementation to use the PaymentProcessor interface class?

Question49: AW Computing tracks order information in custom objects called order__c and order_Line_ c - Currently, all shipping information is stored in the order__c object.
The company wants to expand Its order application to support split shipments so that any number of order_Line__c records on a single order__c can be shipped to different locations.
What should a developer add to fulfill this requirement?

Question50: How does the Lightning Component framework help developers implement solutions faster?

Question51: A team of many developers work in their own individual orgs that have the same configuration as the production org.
Which type of org is best suited for this scenario?

Question52: A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces. public interface Sortable { void sort(); } public interface Drawable { void draw(); } Which is the correct implementation?

Question53: Which two events need to happen when deploying to a production org? Choose 2 answers

Question54: A developer created a child Lightning web component nested inside a parent Lightning web component, parent component needs to pass a string value to the child component.
In which two ways can this be accomplished?
Choose 2 answers

Question55: A developer is writing tests for a class and needs to insert records to validate functionality.
Which annotation method should be used to create record for every method in the test class?

Question56: A developer must perform a complex SOQL query that joins two objects in a Lightning component. How can the Lightning component execute the query?

Question57: Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers

Question58: A developer is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Closed Lost if the lost reason is blank.
Which automation allows the developer to satisfy this requirement in the most efficient manner?

Question59: A company has a custom object, Order__c, that has a required, unique external ID field called OrderNumber__c.
Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of order__c records using the external ID field?

Question60: A company has been adding data to Salesforce and has not done a good Job of limiting the creation of duplicate Lead records. The developer is considering writing an Apex process to identify duplicates and merge the records together.
Which two statements are valid considerations when using merged?
Choose 2 answers

Question61: A developer considers the following snippet of code:

Based on this code, what is the value of x?

Question62: A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Whithin the class, the developer identifies the following method as a security threat: List<Contact> performSearch(String lastName){ return Database.query('Select Id, FirstName, LastName FROM Contact WHERE LastName Like %'+lastName+'%); } What are two ways the developer can update the method to prevent a SOQL injection attack? Choose 2 answers

Question63: A team of developers is working on a source-driven project that allows them to work independently, with many different org configurations. Which type of Salesforce orgs should they use for their development?

Question64: Which three resources in an Azure Component can contain JavaScript functions?

Question65: When a user edits the postal Code on an Account, a custom Account text field named. Timezone' must be updated based on the values in a PostalCodeToTimezone_c custom ogject.
Which two automationtools can be used to implement this feature?
Choose 2 answers

Question66: An org tracks customer orders on an Order object and the items of an Order on the Line Item object. The Line Item object has a MasterDetail relationship to the order object. A developer has a requirement to calculate the order amount on an Order and the line amount on each Line item based on quantity and price.
What is the correct implementation?

Question67: Which Lightning code segment should be written to declare dependencies on a Lightning component, c:accountList, that is used in a Visualforce page?

Question68: When importing and exporting data into Salesforce, whichtwo statements are true?
Choose 2 answers

Question69: A developer needs to implement a custom SOAP Web Service that is used by an external Web Application. The developer chooses to Include helper methods that are not used by the Web Application In the Implementation of the Web Service Class.
Which code segment shows the correct declaration of the class and methods?

Question70: A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit. public class without sharing OpportunityService( public static List<OpportunityLineItem> getOpportunityProducts(Set<Id> opportunityIds){ List<OpportunitylineItem> oppLineItems = new List<OpportunityLineItem>(); for(Id thisOppId : opportunityIds){ oppLineItems.addAll([Select Id FROM OpportunityLineItems WHERE OpportunityId = :thisOppId)]; } return oppLineItems; } } The above method might be called during a trigger execution via a Lightning component. Which technique should be implemented to avoid reaching the governor limit?

Question71: Universal Containers has developed custom Apex code and Lightning Components in a Sandbox environment. They need to deploy the code and associated configurations to the Production environment.
What is the recommended process for deploying the code and configurations to Production?

Question72: A developer creates a batch Apex job to update a large number of records, and receives reports of the job timing out and not completing.
What is the first step towards troubleshooting the issue?

Question73: Universal Containers has a Visualforce page that displays a table of every Container__c being rented by a given Account. Recently this page is failing with a view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?

Question74: Universal Containers recently transitioned from Classic to Lighting Experience. One of its business processes requires certain value from the opportunity object to be sent via HTTP REST callout to its external order management system based on a user-initiated action on the opportunity page. Example values are as follow Name Amount Account Which two methods should the developer implement to fulfill the business requirement? (Choose 2 answers)

Question75: A software company is using Salesforce to track the companies they sell their software to in the Account object. They also use Salesforce to track bugs in their software with a custom object, Bug__c.
As part of a process improvement initiative, they want to be able to report on which companies have reported which bugs. Each company should be able t report multiple bugs and bugs can also be reported by multiple companies.
What is needed to allow this reporting?

Question76: Which two scenarios require an Apex method to be called imperatively from a Lightning web component?
Choose 2 answer

Question77: Which three code lines are required to create a Lightning component on a Visualforce page? Choose 3 answers

Question78: A developer created a Lightning web component called statusComponent to be inserted into the Account record page.
Which two things should the developer do to make the component available?

Question79: Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support representative name.
What is the best solution to assign the case to the appropriate support representative?

Question80: A company decides to implement a new process where every time an Opportunity is created, a follow up Task should be created and assigned to the Opportunity Owner.
What is the most efficient way for a developer to implement this?

Question81: Universal Containers decides to use exclusively declarative development to build out a new Salesforce application. Which three options should be used to build out the database layer for the application? Choose 3 answers

Question82: A developer at Universal Containers is taked with implementing a new Salesforce application that bwill be maintained completely by their company's Salesforce admiknistrator.
Which two options should be considered for buildig out the business logic layerof the application?
Chosse 2 answer

Question83: Which two statements are true about using the @testSetup annotation in an Apex test class?
Choose 2 answers

Question84: Which Lightning Web Component custom event property settings enable the event to bubble up the containment hierarchy and cross the Shadow DOM boundary?

Question85: Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order records will be imported into Salesforce.
How should the Order Number field be defined in Salesforce?

Question86: Developers at Universal Containers (UC) use version control to share their code changes, but they notice that when they deploy their code to different environments they often have failures. They decide to set up Continuous Integration (CI).
What should the UC development team use to automatically run tests as part of their CI process?

Question87: What are three capabilities of the <ltng : require> tag when loading JavaScript resources in Aura components?
Choose 3 answers

Question88: Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component?

Question89: Which three data types can a SOQL query return?
Choose 3 answers

Question90: What should a developer use to script the deployment and unit test execution as part of continuous integration?

Question91: When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?

Question92: A developer wrote an Apex method to update a list of Contacts and wants to make it available for use by Lightning web components.
Which annotation should the developer add to the Apex method to achieve this?

Question93: A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineItem trigger. Which method allows access to the price book?

Question94: Universal Containers wants to back up all of the data and attachments in its Salesforce org once month. Which approach should a developer use to meet this requirement?

Question95: A developer is debugging the following code to determinate why Accounts are not being created Account a = new Account(Name = 'A'); Database.insert(a, false); How should the code be altered to help debug the issue?

Question96: A developer created these three Rollup Summary fields in the custom object, Project__c:

The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project.
Which should the developer use to implement the business requirement in order to minimize maintenance overhead?

Question97: A developer has a Apex controller for a Visualforce page that takes an ID as a URL parameter. How should the developer prevent a cross site scripting vulnerability?

Question98: For which three items can 2 trace flag be configured?
Choose 3 answers

Question99: A developer wants to mark each Account in a List<Account> as either or Inactive based on the LastModified field value being more than 90 days.
Which Apex technique should the developer use?

Question100: What writing an Apex class, a developer warts to make sure thai all functionality being developed Is handled as specified by the requirements.
Which approach should the developer use to be sure that the Apex class is working according tospecification?

Question101: A developer is migrating a Visualforce page into a Lightning web component.
The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service to access record data.
Which security consideration should the developer be aware of?

Question102: Given the following Apex statement:

What occurs when more than one Account is returned by the SOQL query?

Question103: A developer identifies the following triggers on the Expense __c object:
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practices are followed?

Choose 2 answers

Question104: An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship.
How can this be achieved?

Question105: Universal Container* decides to use purely declarative development to build out a new Salesforce application.
Which two options can be used to build out the business logic layer for this application?
Choose 2 answer

Question106: A developer Is Integrating with a legacy on-premise SQL database.
What should the developer use to ensure the data being Integrated is matched to the right records in Salesforce?

Question107: A Salesforce Administrator is creating a record-triggered flow. When certain criteria are met, the flow must call an Apex method to execute complex validation involving several types of objects.
When creating the Apex method, which annotation should a developer use to ensure the method Can be used within the flow?

Question108: What is an example of a polymorphic lookup field in Salesforce?

Question109: A Developer Edition org has five existing accounts. A developer wants to add 10 more accounts for testing purposes.
The following code is executed in the Developer Console using the Execute Anonymous window:

How many total accounts will be in the org after this code is executed?

Question110: A developer migrated functionality from JavaScript Remoting to a Lightning web component and wants to use the existing getOpportunities() method to provide data.
What to do now?

Question111: Refer to the code snippet below:

When a Lightning web component is rendered, a list of apportunities that match certain criteria shopuld be retrievved from the database and displayed to the end user.

Choose 3 answer

Question112: In the Lightning UI, where should a developer look to find information about a Paused Flow Interview?

Question113: Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat using the Apex class, BodyFat, and its method, calculateBodyFat(). The product owner wants to ensure this method is accessible by the consumer of the application when developing customizations outside the ISV's package namespace.
Which approach should a developer take to ensure calculateBodyFat() is accessible outside the package namespace?

Question114: A developer created this Apex trigger that calls Myclass.myStaticMethod:

The developer creates a test class with a test method that calls MyClass.myStaticMethod directly, resulting in 81% overall code coverage.
What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exists?

Question115: A developer is tasked with building a custom Lightning web component to collect Contact information.
The form will be shared among many different types of users in the org. There are security requirements that only certain fields should be edited and viewed by certain groups of users.
What should the developer use in their Lightning Web Component to support the security requirements?